GAMS is used in two phases:

         i.      One uses a text editor and creates a file which contains GAMS instructions.

       ii.      One submits that file to GAMS which executes those instructions causing calculations to be done, solvers to be used and a solution file of the execution results to be created.

 

Getting started to use GAMS-IDE (GAMS with Integrated Development Environment):

  1. Open GAMS

 

  1. Create a "Project" (*.gpr) by going to the "File" selection. Select to define a "New project" (Later you will use your previous project).

 

What is a project? The GAMS-IDE employs a project for two purposes. First, the project location determines where all saved files are placed (to place files elsewhere use the save as dialogue) and where GAMS looks for files when executing. Second, the project saves file names and program options associated with effort. It is recommended that you define a new project every time you wish to change the file storage directory (when GAMS executes a file in a different directory it will not look for options files (*.gck), but will look in the directory where the project is located).

 

  1. Define a project name and location. Put it in a directory you want to use. All files associated with this project will be saved in that directory.

 

  1. Create or open an existing GAMS file (*.gms). It will be automatically saved in your project file.

 

  1. Prepare the file so you think is ready for execution. The GAMS-IDE contains a full featured editor. The IDE recognizes a subset of the GAMS syntax and reflect this in the display colors.

 

  1. Run the file with GAMS by pressing the run button or F9. The so called "process window" (*.log) will then appear which gives a log of the steps GAMS goes through in running the model and your model will run. By double clicking in the process window you can access program output (*.lst). The position of your access is determined by the color of the line you click on:

 

blue line - opens *.lst file and jumps to line in *.lst file corresponding to blue line in process file;

non bolded black line -  opens *.lst file and jumps to location of nearest blue line;

red line - identifies errors in sources file by jumping to *.gms file location of error.

 

  1. Now you are ready to make an analysis of results in your output file (*.lst).